package com.example.shopping_cart_model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 购物车
 * </p>
 *
 * @author sjz
 * @since 2024-07-10
 */
@Getter
@Setter
@TableName("tb_shopping_cart")
@Schema(name = "ShoppingCart对象", description = "购物车")
public class ShoppingCart implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    private String id;

    @Schema(description = "名称")
    @TableField("name")
    private String name;

    @Schema(description = "图片")
    @TableField("image")
    private String image;

    @Schema(description = "主键")
    @TableField("user_id")
    private String userId;

    @Schema(description = "菜品id")
    @TableField("dish_id")
    private String dishId;

    @Schema(description = "套餐id")
    @TableField("setmeal_id")
    private String setmealId;

    @Schema(description = "口味")
    @TableField("dish_flavor")
    private String dishFlavor;

    @Schema(description = "数量")
    @TableField("number")
    private Integer number;

    @Schema(description = "金额")
    @TableField("amount")
    private BigDecimal amount;

    @Schema(description = "创建时间")
    @TableField(value = "create_time")
    private LocalDateTime createTime;
}
